<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <my-component>
        <span slot="name">你好</span>
        <span slot="time">2024/5/15</span>
    </my-component>
</div>


<script src="../js/vue.js"></script>
<script>
    Vue.component('myComponent', {
        // template: '<div>Hello <slot></slot></div>'
        template: '<div>Hello <slot name="name"></slot><slot name="time"></slot></div>'
    })
    var vm = new Vue({
        el: '#app'
    })
</script>
</body>
</html>